package enums;

import enums.CartoonCharacter;
import lombok.extern.slf4j.Slf4j;

import java.util.function.Supplier;

@Slf4j
public class EnumImplementation {
    public static <T> void printNext(Supplier<T> rg) {
        log.info(rg.get() + ", ");
    }
    public static void main(String[] args) {
        // Choose any instance:
        CartoonCharacter cc = CartoonCharacter.BOB;
        for(int i = 0; i < 10; i++)
            printNext(cc);
    }
}